package com.xzk.demo;

import com.xzk.service.UserService;
import com.xzk.service.impl.UserServiceImpl;

/**
 * @Classname StaticFactory
 * @Description 静态工厂
 * @Date 2020/9/18 17:58
 * @Created ccc-ju
 * @email ccc-ju@outlook.com
 */
public class StaticFactory {

    //静态工厂
    public static UserService createUs(){
        //编写很多的业务逻辑，权限校验等操作
        System.out.println("通过静态工厂来创建UserService......");
        return new UserServiceImpl();
    }

}
